<script setup>
import { ref, unref } from 'vue';
import {onLoad} from "@dcloudio/uni-app"

const searchVal = ref("")
const onSearch = ()=>{
	console.log("发起网络请求"+unref(searchVal));
}

onLoad((e)=>{
	if(e.keyword) searchVal.value = e.keyword;
	onSearch();
})


</script>

<template>
	<view class="page-wrap">
		<mod-nav-bar title="搜索" title-color="#fff"></mod-nav-bar>
		<mode-search @on-confirm="onSearch" v-model:keyword="searchVal"></mode-search>
		
		<view class="list-wrap">
			<view class="item-wrap" v-for="item in 5">
				<card-goods></card-goods>
			</view>
		</view>
	</view>
</template>

<style lang="scss" scoped>
	.list-wrap{
		padding:32rpx;
		display: grid;
		grid-template-columns: repeat(2 , minmax(0,1fr));
		gap:30rpx;
	}
</style>
